EN FR
EN FR


Section: Research Program

A declarative design language

Signal  [32] , [45] , [39] is a declarative design language using the polychronous model of computation. A process P is an infinite loop that consists of the synchronous composition P|Q of simultaneous equations x:=yfz over signals named x,y,z. The restriction of a signal name x to a process P is noted P/x.

P , Q : : = x : = y f z | P / x | P | Q

Equations x:=yfz denote processes that define timing relations between input and output signals. There are four primitive combinators in Signal:

  • delay x:=y$𝚒𝚗𝚒𝚝v, initially defines the signal x by the value v and then by the previous value of the signal y. The signal y and its delayed copy x=y$𝚒𝚗𝚒𝚝v are synchronous: they share the same set of tags t1,t2,. Initially, at t1, the signal x takes the declared value v and then, at tag tn, the value of y at tag tn-1.

    y t 1 , v 1 t 2 , v 2 t 3 , v 3 y $ 𝚒𝚗𝚒𝚝 v t 1 , v t 2 , v 1 t 3 , v 2
  • sampling x:=y𝚠𝚑𝚎𝚗z, defines x by y when z is true (and both y and z are present); x is present with the value v2 at t2 only if y is present with v2 at t2 and if z is present at t2 with the value true. When this is the case, one needs to schedule the calculation of y and z before x, as depicted by yt2xt2zt2.

  • merge x:=y𝚍𝚎𝚏𝚊𝚞𝚕𝚝z, defines x by y when y is present and by z otherwise. If y is absent and z present with v1 at t1 then x holds (t1,v1). If y is present (at t2 or t3) then x holds its value whether z is present (at t2) or not (at t3).

    y t 2 , v 2 y 𝚠𝚑𝚎𝚗 z t 2 , v 2 z t 1 , 0 t 2 , 1 y t 2 , v 2 t 3 , v 3 y 𝚍𝚎𝚏𝚊𝚞𝚕𝚝 z t 1 , v 1 t 2 , v 2 t 3 , v 3 z t 1 , v 1

The structuring element of a Signal specification is a process. A process accepts input signals originating from possibly different clock domains to produce output signals when needed. This allows, for instance, to specify a counter where the inputs tick and reset and the output value have independent clocks. The body of counter consists of one equation that defines the output signal value . Upon the event reset , it sets the count to 0. Otherwise, upon a tick event, it increments the count by referring to the previous value of value and adding 1 to it. Otherwise, if the count is solicited in the context of the counter process (meaning that its clock is active), the counter just returns the previous count without having to obtain a value from the tick and reset signals.

 

    process counter = (? event tick, reset; ! integer value;)

        (| value := (0 when reset)

            default ((value$ init 0 + 1) when tick)

            default (value$ init 0)

        |);

 

A Signal process is a structuring element akin to a hierarchical block diagram. A process may structurally contain sub-processes. A process is a generic structuring element that can be specialized to the timing context of its call. For instance, the definition of a synchronized counter starting from the previous specification consists of its refinement with synchronization. The input tick and reset clocks expected by the process counter are sampled from the boolean input signals tick and reset by using the when tick and when reset †expressions. The count is then synchronized to the inputs by the equation reset ^= tick ^= value .

    process synccounter = (? boolean tick, reset; ! integer value;)

        (| value := counter (when tick, when reset)

         | reset ^= tick ^= value

         |);